<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFilmTicketsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('film_tickets', function (Blueprint $table) {
            $table->increments('id');
            $table->string('code',20);
            $table->string('cinema_code',20);
            $table->string('cinema_name',20);
            $table->integer('cinema_status');
            $table->string('screen_code',20);
            $table->string('screen_name',20);
            $table->string('showtime_schedule_code',20);
            $table->string('showtime_schedule_name',100);
            $table->timestamp('business_date')->nullable();
            $table->timestamp('start_time')->nullable();
            $table->timestamp('end_time')->nullable();
            $table->text('films');
            $table->integer('duration');
            $table->string('seat_code',20);
            $table->string('row_num',10);
            $table->string('column_num',10);
            $table->integer('x_coord');
            $table->integer('y_coord');
            $table->integer('group_code');
            $table->integer('playthrough_flag');
            $table->integer('seat_by_number');
            $table->integer('local_default_price');
            $table->integer('default_price');
            $table->integer('lowest_price');
            $table->text('price_plan')->nullable();
            $table->integer('status')->default(1);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('film_tickets');
    }
}
